def pag(house_list, page, sort_key):
    # house_list = house_list.order_by(sort_key)
    if int(page) * 2 - 1 == len(house_list):
        return house_list[len(house_list)-1]
    else:
        return house_list[int(page) * 2 -2: int(page) * 2]
